A semiconductor device described in WO 2011/046091 includes a magnetic shield to protect a semiconductor element that is mounted on a wiring substrate from an external magnetic field. Such type of a magnetic shield, which is dome-shaped, covers the semiconductor element, from above and beside on the wiring substrate. The magnetic shield includes a curved portion that covers the upper side of the semiconductor elements. This improves the magnetic shielding effect as compared with when the surface of the magnetic shield covering the upper side of the semiconductor element is parallel to the semiconductor element.